# arr1 = [1,2,3,4,5,6]
# arr2 = [7,8,9]
# print(2 * arr1)
# s1 = 'welcome'
# arr = s1.split('o')
# print(arr)
#指定等级
#人数
# n = int(input())
# #成绩
# arr = list(map(float, input().split(" ")))
# #获取最高分
# max_score = max(arr)
# for index in range(len(arr)):
#     str = ""
#     if max_score - 40 <= arr[index] < max_score - 30:
#         str = f'学生{index}分数为{arr[index]:.0f},等级为D'
#     elif max_score - 30 <= arr[index] < max_score - 20:
#         str = f'学生{index}分数为{arr[index]:.0f},等级为C'
#     elif max_score - 20 <= arr[index] < max_score - 10:
#         str = f'学生{index}分数为{arr[index]:.0f},等级为B'
#     elif arr[index] >= max_score - 10:
#         str = f'学生{index}分数为{arr[index]:.0f},等级为A'
#     else:
#         str = "等级为F"
#     print(str)
# #打印不同的数
# #数字个数
# n = int(input())
# #数字
# arr = [int(i) for i in input().split(" ")]
# arr2 = []

# for i in range(len(arr)):
#     for j in range(i + 1, len(arr)):
#         if arr[i] == arr[j]:
#             break
#     else:
#         arr2.append(arr[i])
# print(arr2)
#打乱数组
# import random
# def list_shuffle(arr):
#     for i in range(len(arr)):
#         j = random.randint(0,len(arr) - 1)
#         arr[i], arr[j] = arr[j], arr[i]


# arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]
# list_shuffle(arr)
# print(arr)
# #更衣室难题
# arr = [0] * 100
# # i 表示学生
# for i in range(1,len(arr) + 1):
#     #第一个学生打开全部更衣室
#     if i == 1:
#         for j in range(i - 1, len(arr)):
#             arr[j] ^= 1
#     #第二个学生关闭所有更衣室，从第二个开始
#     elif i == 2:
#         for j in range(i - 1, len(arr)):
#             arr[j] ^= 1
#     else:
#         for j in range(i - 1, len(arr), i):
#             arr[j] ^= 1
    
# for i in range(len(arr)):
#     if arr[i] == 1:
#         print(f'L{i + 1}', end = " ")

# #输入矩阵A
# rowA, colA = map(int, input().split(" "))
# matrix = []
# for i in range(rowA):
#     row = list(map(float, input().split(" ")))
#     matrix.append(row)
# #输入矩阵B
# rowB, colB = map(int, input().split(" "))
# matrix2= []
# for i in range(rowA):
#     row = list(map(float, input().split(" ")))
#     matrix2.append(row)

# #初始化矩阵3
# matrix3 = []
# for i in range(rowA):
#     row = [0] * colA
#     matrix3.append(row)

# #计算矩阵A * B
# for i in range(rowA):
#     for j in range(colB):
#         for k in range(colA):
#            matrix3[i][j] += matrix[i][k] * matrix2[k][j]
# #输出
# for i in range(rowA):
#     for j in range(colA):
#         print(f'{matrix3[i][j]:.1f}', end = " ")
#     print()

#按列排序
# n, m = map(int, input().split(" "))
# matrix = []
# for i in range(n):
#     row = list(map(float, input().split(" ")))
#     matrix.append(row)

# #取出每一列然后排序
# for j in range(len(matrix[0])):
#     line = []
#     for i in range(n):
#         line.append(matrix[i][j])
#     line.sort()
#     #把原矩阵的列更新为排好序的列
#     for i in range(n):
#         matrix[i][j] = line[i]
# #打印矩阵
# for i in range(n):
#     for j in range(m):
#         print(f'{matrix[i][j]:.0f}', end = " ")
#     print()

# #螺旋矩阵
# rows, cols = map(int, input().split(" "))
# matrix = []
# for i in range(rows):
#     row = list(map(int, input().split(" ")))
#     matrix.append(row)

# i = 0
# j = 0
# while i < rows:
#     while j < cols - 1:
#         print(matrix[i][j], end = " ")
#         j += 1
#     print(matrix[i][j],end = " ")
#     i += 1
# i -= 1
# j -= 1
# while j >= 0:
#     print(matrix[i][j],end = " ")
#     j -= 1
# j += 1
# while i > 0:
#     i -= 1
#     print(matrix[i][j],end = " ")
#     i -= 1
# i += 1
# while j < cols - 2:
#     j += 1
#     print(matrix[i][j],end = " ")
    
